import 'package:kasax_demos2/entry/entrys.dart';
import 'package:kasax_demos2/entry/movie_new_info_entity.dart';
import 'package:kasax_demos2/meiyingfilm/entry/film_response.dart';
import 'package:kasax_demos2/netio/request_dios.dart';
import 'package:kasax_demos2/netio/request_https.dart';

/// 远程仓库
class RemoteRepository {
  static final RemoteRepository _instance = RemoteRepository._internal();

  factory RemoteRepository() => _instance;

  static RemoteRepository getInstance() => _instance;

  RemoteRepository._internal();

  Future<List<Posts>> fetchPostsList() =>
      HttpManager.getInstance().fetchPostsList();

  Future<List<Posts>> fetchPostsListWithDio() =>
      DioManager.getInstance().fetchPostsList();

  Future<FilmResponse> fetchMovieList(
          String key, int page, int pageSize) =>
      DioManager.getInstance().fetchMovieList(key, page, pageSize);
}
